<template>
  <div>
    <button @click="showPage">切换</button>
    <page-2 v-if="show" />
    <page-3 v-if="!show" />
  </div>
</template>

<script>
import Page2 from './page2.vue'
import Page3 from './page3.vue'
export default {
  name: "page1",
  data() {
    return {
      show: true
    }
  },
  components: { Page2, Page3 },
  methods: {
    showPage() {
      this.show = !this.show
    }
  }
}
</script>

<style>
</style>
